package com.bawei.common.adapter

import com.bawei.common.entity.BannerEntity
import com.bawei.image.ImgLoader
import com.bawei.image.option.ImageOptions
import com.youth.banner.adapter.BannerImageAdapter
import com.youth.banner.holder.BannerImageHolder

/**
 * Author: Jason Zhang
 * Date: 2024/5/22
 * Desc: 图片适配器
 */
class ImageBannerAdapter(data: MutableList<BannerEntity>) : BannerImageAdapter<BannerEntity>(data) {
    override fun onBindView(holder: BannerImageHolder, data: BannerEntity, position: Int, size: Int) {
        ImgLoader.build().loadResourceIntoImageView(holder.imageView.context, data.resId, holder.imageView, ImageOptions.setCommonImage(true).build())
    }
}